const cards = {
  list: [
    {
      id: 1,
      title: '被子在哪里领取',
      likeCount: 999,
      isTop: true,
      pageViewCount: 999,
      commentCount: 199,
    },
    {
      id: 2,
      title: '一食堂在哪里',
      likeCount: 699,
      isTop: true,
      pageViewCount: 1009,
      commentCount: 299,
    },
    {
      id: 3,
      title: '二食堂在哪里',
      likeCount: 699,
      isTop: true,
      pageViewCount: 1009,
      commentCount: 299,
    },
    {
      id: 4,
      title: '创客基地在哪',
      likeCount: 699,
      isTop: true,
      pageViewCount: 1009,
      commentCount: 299,
    },
    {
      id: 5,
      title: '宿舍在哪',
      likeCount: 300,
      isTop: false,
      pageViewCount: 600,
      commentCount: 100,
    },
    {
      id: 6,
      title: '大家可以分享一下食堂的好吃的东西吗',
      likeCount: 180,
      isTop: false,
      pageViewCount: 520,
      commentCount: 90,
    },
    {
      id: 7,
      title: '学校周边有什么好玩的',
      likeCount: 380,
      isTop: false,
      pageViewCount: 660,
      commentCount: 80,
    },
    {
      id: 8,
      title: '有人拼车去高铁站吗',
      likeCount: 90,
      isTop: false,
      pageViewCount: 200,
      commentCount: 20,
    },
    {
      id: 9,
      title: '有一起去五溪广场玩的吗',
      likeCount: 230,
      isTop: false,
      pageViewCount: 510,
      commentCount: 100,
    },
    {
      id: 10,
      title: '有一起去打篮球的吗',
      likeCount: 210,
      isTop: false,
      pageViewCount: 5000,
      commentCount: 99,
    },
  ],
  total: 10
}

const card = {
  id: 1,
  title: '被子在哪里领取',
  landlordId: 1,
  likeCount: 999,
  isTop: true,
  pageViewCount: 999,
  commentCount: 199,
}

const replies = {
  list: [
    {
      id: 1,
      replyUserId: 1,
      nickName: '曾小龙',
      room: '金博楼',
      commentList: [
        {
          createTime: '2022.2.8',
          commentUserId: '胡峻',
        }
      ]
    }
  ]
}

module.exports = [
  // postbars search 贴吧查找
  {
    url: '/postbars/search',
    type: 'post',
    response: _ => {
      return {code: 20000, data: cards}
    }
  },

  // postbars add 贴吧新增
  {
    url: '/postbars/add',
    type: 'post',
    response: _ => {
      return {code: 20000, data: 'success'}
    }
  },

  // postbars ${id} 贴吧查找
  {
    // url: '/postbars/${id}',
    url: `/postbars`,
    type: 'get',
    response: _ => {
      return {code: 20000, data: card}
    }
  },

  // postbars clickLike/${id} 贴吧点击喜欢
  {
    // url: '/postbars/clickLike/${id}',
    url: `/postbars/clickLike`,
    type: 'get',
    response: _ => {
      return {code: 20000, data: 'success'}
    }
  },

  // replies add 新增回帖操作
  {
    url: '/replies/add',
    type: 'post',
    response: _ => {
      return {code: 20000, data: 'success'}
    }
  },

  // replies search 回帖查询
  {
    url: '/replies/search',
    type: 'post',
    response: _ => {
      return {code: 20000, data: replies}
    }
  }, 

  // comments add 新增评论
  {
    url: '/comments/add',
    type: 'post',
    response: _ => {
      return {code: 20000, data: 'success'}
    }
  }, 
]
